package cn.lzy.demo;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * @Description 通过 Java 代码配置方式
 * @Author lzy
 * @Date 2024/2/5 19:42
 * @Version
 **/
public class TestDemo02Java {

    public static void main(String[] args) {
        AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(JavaConfig.class);
        String[] aliases = ctx.getAliases("u2");
        for (String alias : aliases) {
            System.out.println("alias = " + alias);
        }
    }
}
